#ifndef __MOTEC_H__
#define __MOTEC_H__

#include "systick.h"

#ifdef __cplusplus
extern "C" {
#endif

#include "canfestival.h"
#include "objdict.h"
#include "config.h"
#include "dcf.h"
#include "sdo.h"
	
void motec_init(void);
UNS8 Motec_Operation(UNS32 nodeId);
void Motec_Disabled(UNS32 nodeId);
	
static void ConfigureSlaveNode(CO_Data* d, UNS8 nodeId);
/*UNS32 OnMasterMap1Update(CO_Data* d, const indextable * unsused_indextable, UNS8 unsused_bSubindex);*/
void ConfigureSlaveLoop();
	
void Master_heartbeatError(CO_Data* d, UNS8 heartbeatID);
void Master_initialisation(CO_Data* d);
void Master_preOperational(CO_Data* d);
void Master_operational(CO_Data* d);
void Master_stopped(CO_Data* d);
void Master_post_sync(CO_Data* d);
void Master_post_emcy(CO_Data* d, UNS8 nodeID, UNS16 errCode, UNS8 errReg, const UNS8 errSpec[5]);
void Master_post_TPDO(CO_Data* d);
void Master_post_SlaveBootup(CO_Data* d, UNS8 nodeid);
void Master_post_SlaveStateChange(CO_Data* d, UNS8 nodeId, e_nodeState newNodeState);

#ifdef __cplusplus
};
#endif

#endif /* __data_h__ */

